<?php
namespace Common\Model;

use Common\Model\AiModel;

class UserDoctorModel extends AiModel
{
    /**
     * @return bool
     * 绑定医生
     */
    public function bindDoctor($doctor_id=0){
        $doctor_data = array();
        $doctor_data['is_auth'] = 1;
        $doctor_data['authenticate_time'] = ADD_TIME;
        $doctor_data['openid'] = $_COOKIE['wxopenid'];
        $this->where("id={$doctor_id}")->data($doctor_data)->limit(1)->save();
        return true;
    }

}
